function H=hamiltonian(kx,ky)
epsilon=-1.01354;t=2.01493;r=-0.337845;
H=zeros(2);
H(1,1)=epsilon+4*r*cos(kx/2)*cos(sqrt(3)*ky/2)+2*r*cos(kx);
H(2,2)=H(1,1);
H(1,2)=t*(exp(1j*(-kx/2-ky/(2*sqrt(3))))+exp(1j*(kx/2-ky/(2*sqrt(3))))+exp(1j*ky/sqrt(3)));
H(2,1)=conj(H(1,2));
end